Skip to content

Conversation

@jquense
Copy link
Member

@jquense jquense commented May 19, 2021

A convenience hook for a common state case

@jquense jquense requested a review from kyletsang May 19, 2021 14:19

act(() => toggleState[1]())

expect(toggleState![0]).toEqual(false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a test at the end to test toggleState[1](false) case?

Co-authored-by: Kyle Tsang <6854874+kyletsang@users.noreply.github.com>
@jquense jquense merged commit 5f95dd0 into master May 19, 2021
@jquense jquense deleted the useToggler branch May 19, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants